package com.cy.service;

import com.jt.dubbo.mapper.UserMapper;
import com.jt.dubbo.pojo.User;
import com.jt.dubbo.service.UserService;
import org.apache.catalina.mbeans.UserMBean;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        System.out.println("我是第一个服务的提供者");
        return userMapper.selectList(null);
    }

    @Override
    public void saveUser(User user) {
        userMapper.insert(user);
    }
}
